Param($ConfigName, $TargetDir, $DeployDir )

If($ConfigName -eq "Release")
{
    If(Join-Path -Path $TargetDir -ChildPath "Npgsql.xml" | Test-Path) { Join-Path -Path $TargetDir -ChildPath "Npgsql.xml" | Remove-Item }
    If(Join-Path -Path $TargetDir -ChildPath "System.Data.SQLite.xml" | Test-Path) { Join-Path -Path $TargetDir -ChildPath "System.Data.SQLite.xml" | Remove-Item }
    
    $DeployDir | Get-ChildItem -Recurse | Remove-Item -Force -Recurse

    Get-ChildItem $TargetDir | Copy-Item -Destination $DeployDir -Recurse
}
Else
{
    Write-Host "Invalid Configuration!"
    Write-Host "ConfigName: $ConfigName"
    Write-Host "TargetDir: $TargetDir"
    Write-Host "DeployDir: $DeployDir"
}
    